<script setup lang="ts">
import { useGlobalStore } from "@/stores/modules/global";

const globalStore = useGlobalStore();

const theme = computed(() => globalStore.initialState.theme);

const themeVars = computed(() => ({ colorTheme: globalStore.initialState.primary }));
</script>

<template>
  <wd-config-provider :theme="theme" :theme-vars="themeVars">
    <slot />
    <wd-toast />
    <wd-message-box />
  </wd-config-provider>
</template>
